<%--
  Created by IntelliJ IDEA.
  User: wzx
  Date: 2020/10/14
  Time: 9:35
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
</head>
<body>

<%--
 表单 只会将多条记录放到一个list里面，提交到后台
--%>
        <form method="post" action="${pageContext.request.contextPath}/update3.action">
            <table>
                <c:forEach items="${list}" var="person" varStatus="vs">
                    <tr>
                        <td><input type="hidden" value="${person.id}" name="list[${vs.index}].id" /></td>
                        <td><input type="text" value="${person.username}" name="list[${vs.index}].username" /></td>
                        <td><input type="text" value="${person.password}" name="list[${vs.index}].password" /></td>
                    </tr>

                </c:forEach>


            </table>
            <input type="submit" value="提交数据到后台" > <br/>
        </form>
</body>
</html>
